<?php
	$link=mysqli_connect("localhost:3306","root","root","lidu");
	if(!($link)){
		echo "数据库连接失败";
	}else{
		$sql01="SELECT *FROM goods WHERE num!=0";
		$res=mysqli_query($link,$sql01);
		$arr=mysqli_fetch_all($res);
		echo (json_encode($arr));
	}

?>